#include "playstoredvideo.h"
#include "ProtocalIdentifier.h"
#include "singleclient.h"
#include "NetworkCommonFunction.h"

#include <QByteArray>

void PlayStoredVideo::constructCommandData(QByteArray &commandData)
{
	unsigned long commandType = m_CommandType;
	QByteArray xmlData = m_DomDocument.toByteArray();
	unsigned long xmlLength = xmlData.length();
	commandData.append(FBtoNetworkCharP(commandType),4);

	unsigned long commandLength = xmlData.length() + sizeof(xmlLength);

	commandData.append(FBtoNetworkCharP(commandLength), 4);

	commandData.append(FBtoNetworkCharP(xmlLength),4);
	commandData.append(xmlData);
}
